package com.atguigu.lease.common.minio;

import io.minio.MinioClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author Ahang
 * @description
 * @create 2025-07-25 14:54
 */
@Configuration
public class MinioConfiguration {
    @Autowired
    MinioProperties minioProperties;
    @Bean
    public MinioClient minioClient(){
        return MinioClient.builder().endpoint(minioProperties.getEndpoint()).credentials(minioProperties.getUsername(), minioProperties.getPassword()).build();
    }
}
